﻿using Abp.Application.Services.Dto;
using Abp.Timing;
using Hicap.QRCodeWarehouse.Application.Dto.Common;
using System;
using System.ComponentModel.DataAnnotations;

namespace Hicap.QRCodeWarehouse.Application.Dto
{
    public class MonitorQueryDto : IPagedResultRequest
    {
        public MonitorQueryDto()
        {
            MaxResultCount = AppLtmConsts.DefaultPageSize;
            MinDateTime = Clock.Now.AddMonths(-1);
            MaxDateTime = Clock.Now;
            IsOnlyRecordTime = false;
            RecordTime = null;
        }

        public bool IsOnlyRecordTime { get; set; }
        public DateTime? RecordTime { get; set; }
        public DateTime? MinDateTime { get; set; }
        public DateTime? MaxDateTime { get; set; }

        [Range(1, int.MaxValue)]
        public int MaxResultCount { get; set; }

        [Range(0, int.MaxValue)]
        public int SkipCount { get; set; }
    }
}